package com.yfp.file.mapper;

import com.yfp.file.domain.PartUploadLog;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 分片上传记录(PartUploadLog)表数据库访问层
 *
 *
 * @since 2024-01-11 16:50:27
 */
public interface PartUploadLogMapper {

    /**
     * 通过ID查询单条数据
     *
     * @return 实例对象
     */
    PartUploadLog queryById(@Param("uploadId") String uploadId);

    /**
     * 按上传id和零件号查询
     *
     * @param uploadId   上传id
     * @param partNumber 零件号
     * @return {@link PartUploadLog}
     */
    int countByUploadIdAndPartNumber(@Param("uploadId") String uploadId, @Param("partNumber") Integer partNumber);


    /**
     * 新增数据
     *
     * @param partUploadLog 实例对象
     * @return 影响行数
     */
    int insert(PartUploadLog partUploadLog);


    List<PartUploadLog> findPartTagListByUploadId(@Param("uploadId") String uploadId);
}

